﻿@model JSonTest.Items

@{
		ViewBag.Title = "Delete";
}

@section Scripts {
		<script>
				$(document).ready(function () {
						$('#myModal').modal('toggle');
				});
		</script>
}


<h2>@ViewBag.Title Item</h2>
<hr />


<div class="modal fade" id="myModal" role="dialog">
		<div class="modal-dialog modal-lg">
				<div class="modal-content">
						<div class="modal-header">
								<h3>Are you sure you want to delete @Model.item_name?</h3>
						</div>
						<div class="modal-body">
								<dl class="dl-horizontal">
										<dt>
												@Html.DisplayNameFor(model => model.item_name)
										</dt>

										<dd>
												@Html.DisplayFor(model => model.item_name)
										</dd>

										<dt>
												@Html.DisplayNameFor(model => model.item_unit)
										</dt>

										<dd>
												@Html.DisplayFor(model => model.item_unit)
										</dd>

										<dt>
												@Html.DisplayNameFor(model => model.item_quantity)
										</dt>

										<dd>
												@Html.DisplayFor(model => model.item_quantity)
										</dd>

										<dt>
												@Html.DisplayNameFor(model => model.Orders.order_number)
										</dt>

										<dd>
												@Html.DisplayFor(model => model.Orders.order_number)
										</dd>

								</dl>

								@using (Html.BeginForm())
								{
										@Html.AntiForgeryToken()

										<div class="form-actions no-color modal-footer">
												@*<input type="submit" value="Delete" class="btn btn-danger" /> |
														@Html.ActionLink("Back to List", "Index", null, new { @class = "btn btn-primary" })*@

												<button type="submit" value="delete" class="btn btn-danger"><span class="glyphicon glyphicon-trash">&nbsp;</span>Delete</button>		|
												<a href="@Url.Action("Items", "Home")" class="btn btn-primary"><span class="glyphicon glyphicon-arrow-left">&nbsp;</span>Back to List</a>
										</div>
								}
						</div>
				</div>
		</div>
</div>

